﻿<?php 
$sql = 'SELECT * FROM products WHERE id= '.$_GET['id'];
$q = mysql_query($sql)or die(mysql_error());
$rs = mysql_fetch_assoc($q);
?>
<a href="?m=index" style="right:100px;position:fixed;" id="no_print">
	<img src="css/images/dashboard.png" width="110"  style="border:none;"/>
    <h1 style="text-align:center;">แผงควบคุม</h1>
</a>
<a href="#" onclick="window.print();return false;" style="margin-top:145px;right:100px;position:fixed;" id="no_print">
	<img src="css/images/Printer.png" width="110"  style="border:none;"/>
    <h1 style="text-align:center;">ปริ้นเดี๋ยวนี้</h1>
</a>
<div class="print-page" style="width:600px;overflow:hidden;">
	<table width="100%" border="0">
    	<tr>
        	<td width="100" style="border:0 none;">
            	<img src="stickers/<?php echo $rs['image_path'];?>" width="<?php echo ($rs['width']!= "")? $rs['width'] : 150 ;?>" height="<?php echo $rs['height'];?>">
            </td>
            <td valign="top" style="border:0 none;">
        		<?php echo $rs['detail'];?>
                <br/><br/>
                <table width="300">
                	<tr align="center" bgcolor="#CCCCCC" class="product-detail">
                    	<td width="150">สินค้า</td>
                        <td>ราคา</td>
                    </tr>
                    <tr align="center">
                    	<td><?php echo $rs['name'];?></td>
                        <td><?php echo number_format($rs['price'],2,'.',',');?></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
        	<td width="100" style="border:0 none;">
            	<img src="stickers/<?php echo $rs['image_path'];?>" width="<?php echo ($rs['width']!= "")? $rs['width'] : 150 ;?>" height="<?php echo $rs['height'];?>">
            </td>
            <td valign="top" style="border:0 none;">
        		<?php echo $rs['detail'];?>
                <br/><br/>
                <table width="300">
                	<tr align="center" bgcolor="#CCCCCC" class="product-detail">
                    	<td width="150">สินค้า</td>
                        <td>ราคา</td>
                    </tr>
                    <tr align="center">
                    	<td><?php echo $rs['name'];?></td>
                        <td><?php echo number_format($rs['price'],2,'.',',');?></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
        	<td width="100" style="border:0 none;">
            	<img src="stickers/<?php echo $rs['image_path'];?>" width="<?php echo ($rs['width']!= "")? $rs['width'] : 150 ;?>" height="<?php echo $rs['height'];?>">
            </td>
            <td valign="top" style="border:0 none;">
        		<?php echo $rs['detail'];?>
                <br/><br/>
                <table width="300">
                	<tr align="center" bgcolor="#CCCCCC" class="product-detail">
                    	<td width="150">สินค้า</td>
                        <td>ราคา</td>
                    </tr>
                    <tr align="center">
                    	<td><?php echo $rs['name'];?></td>
                        <td><?php echo number_format($rs['price'],2,'.',',');?></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
        	<td width="100" style="border:0 none;">
            	<img src="stickers/<?php echo $rs['image_path'];?>" width="<?php echo ($rs['width']!= "")? $rs['width'] : 150 ;?>" height="<?php echo $rs['height'];?>">
            </td>
            <td valign="top" style="border:0 none;">
        		<?php echo $rs['detail'];?>
                <br/><br/>
                <table width="300">
                	<tr align="center" bgcolor="#CCCCCC" class="product-detail">
                    	<td width="150">สินค้า</td>
                        <td>ราคา</td>
                    </tr>
                    <tr align="center">
                    	<td><?php echo $rs['name'];?></td>
                        <td><?php echo number_format($rs['price'],2,'.',',');?></td>
                    </tr>
                </table>
            </td>
        </tr>       
    </table>
</div>
<style type="text/css">
	.print-page {
		font-size: 14px;
	}
	ul li{
		list-style: none;
		overflow:hidden;
		float:left;
		margin-right:15px;
	}
</style>